1. Calculate the standard error of the log of the OR with the following formula:
2. Calculate Q with the following formula:
, where Q is simply a convenient
intermediate quantity that will be used in the next part of the calculation, and e is the
mathematical constant 2.718.
3. Find the limits of the confidence interval with the following formula:
Like with the risk ratio CI, for confidence levels other than 95 percent, replace the z-score of 1.96 in
Step 2 with the corresponding z-score shown in Table 10-1 of Chapter 10. As an example, for 90
percent confidence levels, use 1.64, and for 99 percent confidence levels, use 2.58.
For the example in Figure 13-2, you calculate 95 percent CI around the observed OR as follows:
1.
, which is 0.5785.
2.
, which is 3.11.
3.
, which is 1.45 to 14.0.
Using these calculations, the OR is estimated as 4.5, and the 95 percent CI as 1.45 to 14.0.
To do this operation in R, you would follow the same steps as listed at the end of the previous
section, except in Step 3, the command you’d run on the matrix is oddsratio.wald() using this
code: oddsratio.wald(obese_HTN). The output is laid out the same way as shown in Listing 13-1,
with a $measure section titled odds ratio with a 95% C.I. In that section, it indicates that the
lower and upper confidence limits are 1.448095 (rounded to 1.45) and 13.98389 (rounded to
13.98), respectively. This time, R’s estimate of the 95 percent CI was close to the one you got
with your manual calculation, but slightly narrower.
A wide 95 percent CI is the sign of an unstable (and not very useful) estimate. Consider a 95
percent CI for an OR that goes from 1.45 to 14.0. If you are interpreting the results of a cohort
study, you are saying that obesity could increase the odds of getting HTN by as little as 1.45, or as
much as 14! Most researchers try to solve this problem by increasing their sample size to reduce
the size of their SE, which will in turn reduce the width of the CI.
Evaluating diagnostic procedures
Many diagnostic procedures provide a positive or negative test result — such as a COVID-19 test.
Ideally, this result should correspond to the true presence or absence of the medical condition for
which the test was administered — meaning a positive COVID-19 test should mean you have COVID-
19, and a negative test should mean you do not. The true presence or absence of a medical condition is
best determined by some gold standard test that the medical community accepts as perfectly accurate